import React, { PureComponent } from "react"
import { connect } from "react-redux"
import { fetchHomeMultiDataAction } from "../store/home"
export class Category extends PureComponent {
    componentDidMount() {
        this.props.fetchHomeMultiData()
    }

    render() {
        const { counter } = this.props
        return (
            <div>
                <h2>category page：{counter}</h2>
            </div>
        )
    }
}
const mapStateToProps = (state) => ({
    counter: state.counter.counter,
})

const mapDispatchToProps = (dispatch) => ({
    fetchHomeMultiData() {
        dispatch(fetchHomeMultiDataAction())
    },
})

export default connect(mapStateToProps, mapDispatchToProps)(Category)
